<template>
  <div>
    <van-button @click="showDialog = true">点击显示弹框</van-button>
    <van-button @click="btnClick">点击显示弹框</van-button>
    <van-dialog
      v-model="showDialog"
      title="修改名称"
      :show-cancel-button="true"
    >
      <van-field></van-field>
    </van-dialog>

    <hr />
  </div>
</template>
<script>
export default {
  data () {
    return {
      showDialog: false
    }
  },
  computed: {},
  methods: {
    btnClick () {
      this.$dialog
        .alert({
          title: '标题',
          message: '弹窗内容'
        })
        .then(() => {
          // on close
          // 点击了确定
        })
    }
  }
}
</script>
<style></style>
